package com.cskaoyan.controller.wx;

import com.cskaoyan.bean.BaseRespVo;
import com.cskaoyan.bean.Brand;
import com.cskaoyan.bean.vo.BrandVO;
import com.cskaoyan.service.BrandService;
import com.github.pagehelper.PageHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("wx/brand")
public class WxBrandController {

    @Autowired
    BrandService brandService;

    @GetMapping("list")
    public BaseRespVo ListBrand(Integer page,Integer size){
        Map<String,Object> map = brandService.ListBrand(page,size);
        return BaseRespVo.ok(map);
    }
    @GetMapping("detail")
    public BaseRespVo brandDetail(Integer id){
        Brand brand = brandService.brandDetail(id);
        return BaseRespVo.ok(brand);
    }

}
